from pathlib import Path
from tkinter import Tk, filedialog

Tk().withdraw()

file_paths = []
folder = Path(r'C:\Users\lenovo\Desktop\中级英语读写2024')
file_types = ['*.docx', '*.pptx', '*.xlsx']

for path in folder.glob('**/*'):
    if path.is_file() and path.suffix.lower() in ('*.docx', '*.pptx', '*.xlsx'):
        print(path)

f = Path(filedialog.askopenfilename(title="Select file..."))
new_filepath = Path(filedialog.asksaveasfilename(title="Rename as...",
                                                 initialdir=f.parent,
                                                 initialfile=f.name))
f.rename(new_filepath)